package games.ninJumpDx.ui.actions
{
	import flash.utils.getTimer;
	
	import games.ninJumpDx.data.GameData;
	import games.ninJumpDx.data.UIConfig;

	public class Troll extends Enemy
	{
		
		public function Troll(name:String)
		{
			super(name);
			 
		}
		
		override public function update(t:Object=null):void
		{
			if(!start || pause)return;
			super.update();
			
			//var time:Number = getTimer() - m_startTime;
			
			
			if(scaleX > 0)
			{
				if(x < 663 - width)
					x +=  GameData.instance.speed ;
				else
				{
					 
					x = 663;
					scaleX = -1;
				}
			}else
			{
				if(x > 105 + width)
					x -= GameData.instance.speed ;
				else
				{
					 
					x = 105;
					scaleX = 1;
				}
			}
		}
	}
}